-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AGENT-950: Implement Separate JWT Tokens for Different User Personas #9039
AGENT-950: Implement Separate JWT Tokens for Different User Personas #9039
Conversation
@pawanpinjarkar: This pull request references AGENT-950 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
fbeb34c
to
41f0f0c
Compare
5d8f2b3
to
e24c117
Compare
/hold this depends on the assisted service PR openshift/assisted-service#6784 |
c6f2b0b
to
3e2ce59
Compare
3e2ce59
to
5e0278d
Compare
5e0278d
to
e67cde7
Compare
@pawanpinjarkar: This pull request references AGENT-950 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
e67cde7
to
98721f8
Compare
@pawanpinjarkar: This pull request references AGENT-950 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
98721f8
to
47ac905
Compare
@@ -21,8 +22,8 @@ curl_assisted_service() { | |||
;; | |||
"GET") | |||
curl -s -S -X GET "${additional_options[@]}" "${baseURL}${endpoint}" \ | |||
-H "Authorization: ${AGENT_AUTH_TOKEN}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PATCH doesn't need the ${authz} token?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, for now the appliance isn't directly using the code (the func was copied to the codebase instead).
Will probably be handled later on to reuse this func, so I think it'd be safer to update the PATCH flow as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will update the PATCH
flow here(even if its unused now). Please note , later in the appliance, you will need to pass the USER_AUTH_TOKEN
func ParseExpirationFromToken(tokenString string) (time.Time, error) { | ||
claims, err := ParseToken(tokenString) | ||
if err != nil { | ||
return time.Time{}, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something but I wonder why its necessary to return time on a failure since it seems to be unused on failure in gencrypto/authconfig.go. If its needed please add a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the comments
/approve |
…e at the same time.
9d0331b
to
e45f4d6
Compare
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@@ -3,26 +3,27 @@ | |||
curl_assisted_service() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a request fails because of an authorization error, it would be good to log the error so that it is visible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do it in a follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, with the latest commit, the auth token can now be specified at only one place rather than sending it from n number of places when calling curl_assisted_service
/hold cancel |
/test integration-tests-nodejoiner |
/lgtm |
@pawanpinjarkar: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
5e705f0
into
openshift:master
[ART PR BUILD NOTIFIER] Distgit: ose-installer-altinfra |
[ART PR BUILD NOTIFIER] Distgit: ose-installer-terraform-providers |
[ART PR BUILD NOTIFIER] Distgit: ose-baremetal-installer |
[ART PR BUILD NOTIFIER] Distgit: ose-installer-artifacts |
auth_scheme
to determine which user persona is allowed to access an endpointWatcher-Authorization
and is used by wait-for command ( watcher persona)Authorization
and is used by curl API requests, systemd services ( user persona)X-Secret-Key
and is used by agent service ( agent persona)